<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('users', function(Blueprint $table)
		{
			$table->increments('id');
            $table->string('name');
            $table->string('email', 100);
            $table->string('phone', 20);
            $table->string('gender', 10);
            $table->enum('department', ['管理部', '网络开发部', '软件开发部', '硬件开发部', '美术部']);
            $table->enum('role', ['admin', 'manager', 'staff']);
            $table->string('salary');
            $table->string('avatar_url')->default('img/vimeo.jpg');
            $table->string('password');
            $table->string('remember_token', 100)->nullable();
            $table->string('token');
            $table->boolean('active')->default(false);
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('users');
	}

}
